package co.com.inventarios.modelo;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * Label entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "LABEL", schema = "MANAGER", uniqueConstraints = {})
public class Label implements java.io.Serializable {

	// Fields

	private Long lbcodnum;
	private String lbcodchar;
	private String lbnombre;
	private Set<Mngmcn> mngmcns = new HashSet<Mngmcn>(0);
	private Set<RequiPro> requiPros = new HashSet<RequiPro>(0);
	private Set<RequiDoc> requiDocs = new HashSet<RequiDoc>(0);
	private Set<Mngdoc> mngdocs = new HashSet<Mngdoc>(0);

	// Constructors

	/** default constructor */
	public Label() {
	}

	/** minimal constructor */
	public Label(Long lbcodnum) {
		this.lbcodnum = lbcodnum;
	}

	/** full constructor */
	public Label(Long lbcodnum, String lbcodchar, String lbnombre,
			Set<Mngmcn> mngmcns, Set<RequiPro> requiPros,
			Set<RequiDoc> requiDocs, Set<Mngdoc> mngdocs) {
		this.lbcodnum = lbcodnum;
		this.lbcodchar = lbcodchar;
		this.lbnombre = lbnombre;
		this.mngmcns = mngmcns;
		this.requiPros = requiPros;
		this.requiDocs = requiDocs;
		this.mngdocs = mngdocs;
	}

	// Property accessors
	@Id
	@Column(name = "LBCODNUM", unique = true, nullable = false, insertable = true, updatable = true, precision = 22, scale = 0)
	public Long getLbcodnum() {
		return this.lbcodnum;
	}

	public void setLbcodnum(Long lbcodnum) {
		this.lbcodnum = lbcodnum;
	}

	@Column(name = "LBCODCHAR", unique = false, nullable = true, insertable = true, updatable = true, length = 2)
	public String getLbcodchar() {
		return this.lbcodchar;
	}

	public void setLbcodchar(String lbcodchar) {
		this.lbcodchar = lbcodchar;
	}

	@Column(name = "LBNOMBRE", unique = false, nullable = true, insertable = true, updatable = true, length = 20)
	public String getLbnombre() {
		return this.lbnombre;
	}

	public void setLbnombre(String lbnombre) {
		this.lbnombre = lbnombre;
	}

	@OneToMany(cascade = { CascadeType.ALL }, fetch = FetchType.LAZY, mappedBy = "label")
	public Set<Mngmcn> getMngmcns() {
		return this.mngmcns;
	}

	public void setMngmcns(Set<Mngmcn> mngmcns) {
		this.mngmcns = mngmcns;
	}

	@OneToMany(cascade = { CascadeType.ALL }, fetch = FetchType.LAZY, mappedBy = "label")
	public Set<RequiPro> getRequiPros() {
		return this.requiPros;
	}

	public void setRequiPros(Set<RequiPro> requiPros) {
		this.requiPros = requiPros;
	}

	@OneToMany(cascade = { CascadeType.ALL }, fetch = FetchType.LAZY, mappedBy = "label")
	public Set<RequiDoc> getRequiDocs() {
		return this.requiDocs;
	}

	public void setRequiDocs(Set<RequiDoc> requiDocs) {
		this.requiDocs = requiDocs;
	}

	@OneToMany(cascade = { CascadeType.ALL }, fetch = FetchType.LAZY, mappedBy = "label")
	public Set<Mngdoc> getMngdocs() {
		return this.mngdocs;
	}

	public void setMngdocs(Set<Mngdoc> mngdocs) {
		this.mngdocs = mngdocs;
	}

}